-
-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API to rerequest a check run #1141
Conversation
*/ | ||
public function rerequest(string $username, string $repository, int $checkRunId) | ||
{ | ||
$this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this accept header required for this api endpoint? I don't seem to find it in the api docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it is the wrong header. I replaced it with the correct one that is listed here
*/ | ||
public function rerequest(string $username, string $repository, int $checkRunId) | ||
{ | ||
$this->acceptHeaderValue = 'application/vnd.github+json '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Spea this is the default header so it doesn't need to be set here. The client will apply that one by default. So if you can remove this line, the PR is good to go!
php-github-api/lib/Github/Client.php
Lines 136 to 139 in 845545b
$builder->addPlugin(new Plugin\HeaderDefaultsPlugin([ | |
'User-Agent' => 'php-github-api (http://github.com/KnpLabs/php-github-api)', | |
'Accept' => sprintf('application/vnd.github.%s+json', $this->apiVersion), | |
])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing that out. I removed it now.
This change adds a new method to rerequest a check run (see also https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#rerequest-a-check-run).
Thanks @Spea! And congrats on your first contribution! 🎉 |
This change adds a new method to rerequest a check run (see also https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#rerequest-a-check-run).